﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CSScriptLibrary;

namespace MOJsdk
{
    public class ScriptInterop
    {
        public static bool RunLogicMethod(string Method, object elem)
        {
            try
            {
                LogicalElement css = CSScript.Evaluator.LoadCode<LogicalElement>(Method);
                css.elem = elem;
                return css.Evaluate();
            }
            catch (Exception ex)
            { return false; }
        }
    }
}
